export class FolderUtils {
  /**
   *
   * @param path
   */
  static getParentPath(path: string) {
    if (typeof path !== 'string') {
      return null
    }
    const firstSignIndex = path.indexOf('/')
    const lastSignIndex = path.lastIndexOf('/')
    if (firstSignIndex === lastSignIndex) {
      return null
    }
    return path.substring(0, lastSignIndex)
  }
}
